For safety-critical systems, the safety constraints are required to be satisfied through control design. To describe and apply system safety constraints, controlled invariant set (CIS) and control barrier function (CBF) are effective methods. In many applications, safety constraints may change dynamicly in operation environment and thus are not always continuous. However, such discontinuity and switching problems of CIS and CBF were well-addressed in the literature. In this paper, to tackle the issues, novel definitions of switched CIS (SCIS) and switched CBF (SCBF) are proposed. To address the undifferentiability issue in SCBF, a novel relaxation function that connects different SCISs is proposed. Sufficient conditions for selecting the relaxation function are proposed with a rigorous proof. In the application of vehicle safety control for an obstacle avoidance problem, a relaxation function is selected and demonstrated in the safety control design. To evaluate the effectiveness of the proposed definitions and control design, simulation results are presented and discussed.