Need some pointers on some code

Will state that better......Got a one digit 7 segment and mean it like this

No 0= Park ( P)
No 1= Reverse ( R )
No 2= Nutral (N )
No 3 = Drive ( D )

No 4 = Three (3) need the three to work from a switch and blank out drive without moving the potentiometer.
No 5 = Two (2)
No 6 = Low (1)