Seems like an easy question. The answer is either yes or no. You either have been or you haven't. It's black or white. Unless it's not. There are two ways out of a marriage, divorce and annulment, the latter providing the grey area that makes the answer to this question difficult.
Getting an annulment isn't easy. You go through more legal work than you would with a divorce. More than half the time you have to go to court to get a ruling. Annulments wipe your record of the marriage that happened. If you were to search the Internet for advice on getting one, chances are all you'll find is legal advice. There isn't much around that focuses on the emotional aspect. There's plenty on if you're getting a divorce and yes, this is helpful for people going through annulments but nothing catered to someone trying to erase the marriage.
Back to the question, 'have you been married before?' -- how do you answer this when you've had an annulment? The answer could go either way. Legally, if that was your first marriage, you were never married, it didn't happen. The state doesn't recognize it. The courts don't. The next time you go to get a marriage license you would say that that is your first marriage, not your second. Legality aside, how do you answer when you meet someone and they ask you? You can say yes. You went through the motions, you lived it for however long you were in it, but you can also say no because there won't be any legal records of it. Where do you draw the line? How do you answer this question without it being a lie?
Like life, this isn't always a simple question and it will come down to who you're talking to and how much you want to delve into that time of your life. It's not easy walking around with a failed marriage under your belt especially when there will be questions that will be difficult to answer. It's even harder when you start carrying this around in your mid-twenties. When all your friends are starting to get engaged and married and having babies, going through an annulment, or a divorce for that matter, is hard. Not having anyone that can relate, because chances are you're the first to go through this from your group of friends. So who do you discuss with on how to answer such a question? It's easy to get opinions from people around you on what you should say. The ones that don't want to remember that aspect of your life will tell you "Say no, you were never married. Because you weren't. That was a play you put on to let the inner actress out." Others will tell you to not respond, until you know the person and you trust them and can't see yourself ever lying to them. And some will be just as confused and tell you to flip a coin.
At the end of the day, it comes down to how you feel and what you want to do. At first it might be easier to just dodge the questions, but eventually you will have to confront them. Old friends that heard from a friend of a friend that you got married might pop up and ask you, "Did you get married? Congrats!" which will lead you to sigh and start to explain that "Yes I did, but I'm not now." But when you're at a mixer and the group is asked to raise their hands if they've ever been married you can choose to keep your hand down. It's up to you, the answer can go either way. It all comes down to who you want to tell and why.