Richard is on it (as usual). Remember that when you're using the serial terminal you're sending ASCII characters. In your original code you're checking if the variable contains the value 1 while you should check if it contains the ASCII character "1".

IF SWITCH = 1
IF SWITCH = "1"
IF SWITCH = $31
IF SWITCH = 49

Do you see (and understand) the difference between the four lines above?

/Henrik.