Section 475(3) in The Code of Criminal Procedure, 1973
(3)A High Court may, if it thinks fit, direct that a prisoner detained in any jail situate within the State be brought before a Court-martial for trial or to be examined touching any matter pending before the Court-martial.