The Glorified Allah commands:
“Oh you who believe! Intoxicants, gambling, idols, arrows for seeking the future or luck are all abominations, the works of the strayed. So, keep away from them that you may attain the true success.” (Al-Ma’ida/The Feast 5:90)
Keeping away from something means keeping a distance with them. That’s why the Messenger of Allah said:
According to a narration from Anas ibn Malik, “The Messenger of God cursed ten people about intoxicants: the producer, the manufacturer, the drinker, the carrier, the transporter, the server, the seller, the earner, the buyer, the caterer.” (Tirmidhi, Buyu’, 59.)
A person who eats in a place where alcohol is served is not in any of these groups, so it is permissible to eat at places where alcohol is served.
If you have an opportunity to choose another place, however, it would be an extra good deed.