Recent controversy surrounds the use of the Trail Making Test as a measure of cognitive flexibility, given that the Trail Making Test, Part B (TMT-B) also differs from Part A (TMT-A) in factors of motor control and perceptual complexity. The present study compared performance in the TMT and a set-switching task in order to test the assumption that cognitive flexibility is captured in TMT-B performance. Set-switching tasks have low motor and perceptual selection demands, and therefore provide a clearer index of executive function. In this study, participants made category judgments for digits, letters, or symbols across a series of trials, and performance for consecutive same-task trials was compared with task-switch trials. Results of the set-switching task indicated significant switch cost, but only for the situation of task alternation (e.g., an ABA series), suggesting that task-set inhibition may play a role in this effect. Alternating-switch cost was significantly correlated with TMT-B performance, especially with the TMT-B to TMT-A ratio (B/A). Cost for alternating switches was especially large for participants with B/A ratio > 3. These results provide direct evidence that the B/A ratio of performance in the TMT provides an index of executive function.