Open following link for illustration and instructions:
As a general rule, the new 3-speed switch has to have same number of wires (either 3 or 4).
The new switch and old switch have to match electrically, which means the old and new switches have to be tested with a continuity tester or multimeter (both testers available at local hardware).
Testing is necessary because wire colors do not always match and because each pull chain can activate different wire or combination of wires.
http://waterheatertimer.org/How-to-wire-Cooper-277-pilot-light-switch.html#3-speedAdd a comment for more assistance as you work on the project.
Take a moment and vote on answer:
And take advantage of fixya expert assistance live.
For a price, expert works with you while you work on 3-speed switch or any do-it-yourself project.
Fixya is always less expensive than a service call.