What was like the relation between Greeks and Persians before W happened.
Is "What was like" correct?
You may be wanting to ask...
What was the relationship between the Greeks and the Persians like before W happened?
This question could be twisted into a command like...
Describe the relationship between the Greeks and Persians before W happened.
Technically, however, your sentence is correct as-is, if you use a question mark.
What was like the relation between Greeks and Persians before W happened?
As other have pointed out, however, the way that you are phrasing the question sounds kind of weird. In the context of a riddle, your sentence might be okay, but otherwise you may want to provide more background information. Maybe try something like...
Before W happened, relations between the Greeks and Persians was characterized by X, Y, and Z. Do you know of any other pair of nations, from any period in history, whose relationship was also characterized by X, Y, and Z?