Texas Governor Rick Perry, a potential 2016 presidential candidate, on Wednesday compared being gay to having a drinking problem.

Perry, a Republican, made his comments while addressing the Commonwealth Club of California in San Francisco.

An audience member asked Perry his thoughts on so-called “reparative therapy,” which attempts to alter the sexual orientation of people from gay to straight. Over the weekend, the Texas Republican Party endorsed the practice in its platform, despite opposition from professional mental health associations. California has outlawed “ex-gay” therapy to minors.

Perry answered that he did know whether such therapies work, according to the San Francisco Chronicle.

Commonwealth Club interviewer Greg Dalton followed up by asking Perry whether he believes being gay is a disorder.

“Whether or not you feel compelled to follow a particular lifestyle or not, you have the ability to decide not to do that,” Perry answered. “I may have the genetic coding that I'm inclined to be an alcoholic, but I have the desire not to do that, and I look at the homosexual issue the same way.”

(Related: On Anderson Cooper, Rep. Bryan Hughes defends inclusion of “ex-gay” plank in GOP platform.)