You will have to use some sort of logic. If you are comfortable with microcontrollers, you can use an 8-pin device, such as PIC12xx, or PIC10Fx
If you want to use logic circuits, that can be done, too, but it will be much more complicated.
If you are willing to use a PIC, I can help you with the code.
Meanwhile I will try and see if anything simple can be done with a couple of 555's.
From the picture it appears the switch only has 3 wires. Do you know how it switches? Is it like a binary code?