We demonstrate that the electrical "switching" behavior of single molecules connected between two electrode contacts can be controlled by altering their structure and electrochemical characteristics. The electrical properties of gold|molecule|gold single molecule junctions incorporating HS(CH2)6-X-(CH2)6SH, where X = viologen (4,4'-bipyridinium) or pyrrolotetrathiafulvalene, are determined using a scanning tunneling microscopy based technique. The switching behavior, controlled through a tuneable electrochemical gate, changes from an on-off response (viologen) to an off-on-off response (pyrrolotetrathiafulvalene) on changing the central redox group. In contrast, the electrical properties of junctions incorporating redox-inactive HS(CH2)6-1,4-C6H4-(CH2)6SH do not alter significantly as a function of applied potential.