One wire is the hot off the plug, one is the hot to one socket, and the third wire is the hot for the second socket. You'll have to check the switch for the exact color code / which wire is which (I don't know if there is a standard). You can test it easily with a multimeter as well.