In all cases where two (2) or more persons are jointly or otherwise concerned in the commission of any criminal offense, either of the persons may be sworn as a witness in relation to the criminal offense, but the testimony given by the witness in no instance shall be used against him or her in any criminal prosecution for the same offense.