Frédéric ******************
@Brian ****************
That's because your sentence is not correctly structured. A question doesn't start with "if" but with "when".
"When would we have gone to eat if your sister had come?"
Reverse translation: "When can we go eat if your sister comes?"
Now to be closer to the Thai way of speaking, you would have asked "At what time would we have gone to eat if your sister had come?"