A way to give personal advice by imagining yourself in the other person's shoes.
“If I were you, I'd ask for a second opinion before agreeing to the surgery.”
Always use "were" (not "was") — this subjunctive form is a marker of higher grammar range.