This work studies data-driven switched controller design for discrete-time switched linear systems. Instead of having access to the full system dynamics, an initialization phase is performed, during which noiseless measurements of the state and the input are collected for each mode. Under certain conditions on these measurements, we develop a stabilizing switched controller for the switched system. To be precise, the controller switches between identifying the active mode of the system and applying a predetermined stabilizing feedback. We prove that if the system switches according to certain specifications, this controller stabilizes the closed-loop system. Simulations on a network example illustrate our approach.