No mother of a child born out of wedlock shall be excused, on the ground that it may tend to incriminate her or subject her to a penalty or a forfeiture, from attending and testifying, in obedience to a subpoena of any court, in any suit or proceeding based upon or growing out of the provisions of this Article, but no such mother shall be prosecuted or subjected to any penalty or forfeiture for or on account of any transaction, matter, or thing as to which, in obedience to a subpoena and under oath, she may so testify.
N.C. Gen. Stat. § 49-6