A Switching-based Moving Target Defense Against Sensor Attacks in Control Systems