Wiring a 4 pins slide switch
It would be better to use a DP3T switch. If you can stand the voltage drop of a Schottky diode, you can use @Hamid's scheme wired as so:
(pin 1 has the gap to the next pin)
The divider loads against leakage in D1 up to 70°C at least, for very high temperatures you might have to reduce the values. A divider is used to prevent applying more than Vdd to the input pin.



simulate this circuit &ndash; Schematic created using CircuitLab
The lower schematic shows a circuit that does not suffer the leakage or voltage drop of the Schottky diode but has one extra component- eg. PEMH9,115 dual digital transistor (in dashed box). R8 prevents transient current through the MCU input while M1 turns on.