Can't get this switch / case sketch to work. Any ideas?

Start by putting any curly brace on its own line and using the auto format tool (In the Arduino IDE, under Tools) to make the code more readable. The seemingly random indentation is distracting.