Serial inputs

You're using the numerical value of the ASCII digit(s) you pass down.
"Serial.read" reads only one character, not a string.
So, if you enter "1" on the serial monitorm the Arduino read the decimal value 48 (0x30) which is the ASCII value of the character '1'.

Have a poke around the playground and the forum to see how to convert strings to integers ("atoi").
This sort of problem comes up regularly.