S.C. Code Ann. § 44-23-1150
A person having sexual intercourse with a patient or trainee of a state mental health facility, whether the patient or trainee is within the facility or unlawfully away from the facility, or an employee of a state or local correctional facility having sexual intercourse with an inmate of that facility, is guilty of a felony and, upon conviction, must be imprisoned not more than ten years.