digital read/write not working within switch/case serial loop

Any idea how I can implement reading the pin state and changing the mode whilst also monitoring the serial input?

Do them independently. Read the switch state. Then, read the serial data, if any.