There are a couple of things to try - a spritz of contact cleaner as has been properly suggested as a first step. And if that doesn't fix it, the next step would be opening up the switch and bending the wiper contact to make a better connection. That is a bit tricky, but it can be done. The main issue is that there are parts that can fly out when you open up the switch. If you decide to open it by prying open the little latches around the perimeter of the switch, understand that there are little springs and balls that maintain the contact pressure, and they might go flying if you aren't prepared for them.