That's a very situational question. Getting beaten up is never good, but beating anyone up for no reason is never good either. However, I will say that I make no distinction about who I hit back when attacked. I've lost two perfectly good teeth because I thought I shouldn't hit a girl back and just try to calm her to keep backing off.
I've never really hit anyone without the intent of defending myself. Tends to be I tell them I'm going to hit back. Sometimes it works, sometimes it doesn't.
So yeah, I've hit a woman. Actually, women. This is not because I feel like I should hit women in particular. Just as I've hit men. For the same reasons, no extra hate or anger for either. I'd like to think myself gender equal, at least in this case. Equality doesn't mean I'm going to be extra nice to one side, it means I'm going to be treating both equally. I really would rather not punch anyone, but I'd rather not get punched either. So if it comes to that, then it really doesn't matter whether they have a pair of testicles or not.
I will say this. It struck a special nerve with me once, some time back when I was still studying. There was this very big, strong (as in, weightlifter) girl once. She beat people up exactly due to the fact that it's generally considered bad to beat women up. And she was more buffed-up than most men I've seen, and tall. There was more it it, I'm sure, but I never knew what it was all about.
It wasn't me who hit back, since I never had to come face to face with her (and thank whatever deity you believe in for that, she would have floored me). It was some other guy. From what I hear, he had had some serious problems with being abused, and went what is scientifically known as batshit crazy when she forced him to fight. Broke her jaw and nose (and possibly something else, I really have no idea) and knocked her out while screaming. There were paramedics and the police involved. I never really saw the fight, but from what I understand it was a nasty thing.