How to express "If only ..."

The simplest thing is if.

For example, I wish I were you.

However, we should pay attention to the subjunctive mood. I am you, and I was, because in fact I am not you, so we are the expression of subjunctive mood, not the general tense. I am you.