It depends on the situation.
If they are asking you in front of others, say, "I'm okay." Approach them later, alone, to talk more in depth.
To approach someone who you want to talk about something that is making you sad, upset, confused, etc. Go to the person privately and say, "Hi. I have been feeling a little out of sorts. I would like to talk to you about it. Is now a good time?" If they say, "Yeah, what's up?" - talk to them. If they say, "Now is a little busy." Arrange a better time with them.
Usually, at work, I just say the perfunctory, "Fine" or, if I am in a good mood, "Excellent." If it is someone I know very well, I might say, "Passable, I'm hoping for a good day!!" (but I will say this with a smile).
If I am actually having a headache or really not feeling well, I might say to my co-workers, "I'm not feeling 100% today. I will do my best, but I really need ..." (the thing I really need might be "a little quiet time" or "approach me for really urgent matters only" or "I might be a little quieter today." etc. I don't have to go into the details about why I am feeling a little run down - but it will give my co-workers enough information to know that I am not well and to give me some extra space that day.
Hope that this helps.
CR