Facultative homosexuality (dictionary)
From BoyWiki
Facultative Homosexuality" describes a man who lies more towards the heterosexual side of the sexual continuum who does have some same-sex desire and who engages in homosexual sex and behavior while in prison only. After he is released from jail he returns to a heterosexual lifestyle.