I'm not out yet, so depending on the situation, I would either refuse to answer or possibly take the opportunity to come out. It would depend who was asking though. A random person in the street is unlikely to ask me but given the amount of trans stuff I have been sharing lately (deliberately to put the idea in people's heads to make it easier when I do come out) I wouldn't put it past a friend. If that was the case, then I would tell them but ask them to do me the courtesy of keeping it to themself until I am ready to tell other people.
I'm pretty open with people about my mental health issues (depression and anxiety) and have taken the opportunity to advocate from time to time. So I would probably do the same with my gender. It's very liberating to not have to worry about being perceived in a certain way anymore, even at the moment.