How to use submit value in Controller switch case function?