In any investigation before a Grand Jury, or trial in any court, the court on motion of the State may order that any material witness be released from all liability to be prosecuted or punished on account of any testimony or other evidence he may be required to produce.
725 ILCS 5/106-1