In a single switch-case construction you can go only to one of the cases. Check this code and change 2.0 to 2:
S = 2;
switch S
case 1
disp('q');
case 2
disp('w');
case 3
disp('e');
case 2.0
disp('r');
end