Angular position sensor?

If you have access to the end of the shaft you can mount a magnet and use a special Hell-effect angle encoder.

What you want is called an Absolute Shaft Encoder.