(were) is the subjunctive mood past tense of the verb (to be)
If I were you,
If he were rich,
If you were a king,
You use (were) for contrary to the present fact
"I" 後面用"were":
"If"係解"如果"
"If I were you"係解"如果我係你"
因為"我"冇可能係"你",,所以用"were"