Code:
Setpoint  VAR byte [4]

Setpoint[0]=0
Setpoint[1]=2
Setpoint[2]=10
Setpoint[3]=19


Main_Loop:

Setpoint[PortB>>6]

Goto Main_Loop
This is an additional solution without If/Then or Select Case.

Cheers

Al.