I'll turn it around and present it from another perspective. You made you look like a total moron. (actually, you mostly made yourself look like a bit of a mooch - someone who's asking your coworkers for help even before you do a basic google search) He just pointed it out so that everyone could notice. There's no way to win any sort of fight (especially a public fight) that might come out of this. You can only lose. The best thing you can do for yourself socially in situations like this (ie, someone caught you obviously in the wrong, especially on a minor matter) is to acknowledge it graciously, perhaps offer some quick explanation (lack of sleep, low blood sugar, or whatever) and express in some fashion that you'll try to do better in the future. Being willing to admit, accept, and then fix small screwups actually reflects well on you rather than poorly, in all but the most status-obsessed groups.
Now, one thing you can do, if you think that you're on reasonably good terms with this guy, is talk with him privately. Say something like "Okay, in retrospect, it was a stupid question, and I'm sorry for asking it. At the same time, if I do something dumb, could you please let me know on private chat, rather than calling me out on the public chat like that? That was kind of not cool."
1.
What do you mean "public chat"?2.
If it wasn't directed at you then you might consider simply ignoring it.3.
Do they make a good point? I'm often irritated by people asking me questions when they haven't done any leg work for themselves. Is that the case here? Is he irritated at your lack of effort? After all, it isn't his job to be your font of knowledge, is it?