“Are you a lesbian, Miss?”
“Are you gay, Sir?”
If you are ‘out’ and wish to affirm this, then do so. Children need positive LGBT role models in their lives.
If you are not lesbian or gay or you are not ‘out’ and you do not wish to share that information it is better to respond with “Would it matter if I were?” as it keeps the dialogue open and allows for positive discussion of the issues.
“No, I’m not.” Closes the dialogue and is often heard (mistakenly) by someone with homophobic views as tacitly supporting that homophobia.