Looking for some help in stopping this motorized potentiometer midway

i am pretty sure of that due to this line

if (Serial.available() > 0)

it means that if the arduino will wait until a value more then 0 then it will proceed to the other part of the program.
since your first case is 0 but the program only execute after receiving anything more then 0 i am sure that arduino will never execute for case 0.