Potentiometer Autonomous selector

What do I need to do to program the POT to select an autonomous program on E-Z C v4? I’ve seen people use tham like that in competition but I have had no success. Any help would be very appreciated.

You need a potentiometer and a couple of if statements.

if (POT < 100){
AutoFunction1
} else if ( POT >100 && POT < 200){
AutoFunction2
} else if ( POT >300 && POT < 400){
AutoFunction3
}else if ( POT > 400 && POT < 500){
AutoFunction4
}

and so on.

Thats it.