Rotary Switches - 4 Positions, Two Outputs - How to determine the selected "mode"?
Simply connect the two outputs to two microcontroller inputs.  Software can easily determine the switch position from the states of the inputs.

If you apply +5V to the switch input, you will need pull-down resistors of 5K - 10K from each microcontroller input to ground, so the inputs will be Low when the switch is not pulling them High.