Not sure if this is what you are asking for, but it is a tutorial for a Gibson Epiphone (but the concept is the same), and you would either repair, or replace the switch :
If you completely remove the knob, and the switch works like it should (stays in place), then it is probably the knob itself being too long. Sometimes the knob and switch are not totally compatible, causing the knob to go too far into the switch recess and not being able to "lock" into position.