How to make Arduino runs continuous routines even inside a "switch case loop".

Is there anything else that needs to be changed in the code?

You haven't posted any, so how can we tell?