Whenever it shall be necessary to bring any prisoner into court as a witness in any case the presiding judge may order such prisoner to be brought into court, without the necessity of a writ of habeas corpus. And when the said prisoner shall have given his evidence the judge shall cause him to be remanded to the custody of the officer to whose keeping he shall have been originally committed.
S.C. Code § 19-7-50