I don't really understand. Is inPut int, char or whatever?
Basically your saying - if inPut is equal to '1', do what case 1. If it's equal to '2', then it will do case 2. Then for everything else (default), it will do case default, which means everything other than 1 or 2. So if you enter 3, 19, etc, it will do default.
You can use the switch cases to do anything you want. However the input argument can only be either of type int or char. And the switch will only evaluate the selection once, so it wouldn't be of any use to you either. Unless you contain it within a loop of some kind.
Normally I only use the switch for a menu in the main program. Here is an example how I normally uses it, hope it help.