In this paper, we propose a switching fault-tolerant control (FTC) approach for linear systems subject to time-varying actuator and sensor faults. The faults under consideration include effectiveness loss and outage of actuators and sensors. All possible fault scenarios are categorized to different fault cases according to fault type and location. For each case, a parameter-dependent (or constant gain) FTC will be designed to stabilize the faulty system with optimal controlled performance. The synthesis condition of such a local FTC control laws will be formulated in terms of linear matrix inequalities (LMIs). To achieve both local optimal performance and switching stability, Youla parameterizations of individual local FTCs are derived and applied to the closed-loop system. The quadratic stability of fast switching closed-loop system is guaranteed by a common quadratic Lyapunov function. A numerical example is used to demonstrate the proposed switching fault-tolerant control approach on a simple faulty systems with multiple faults.