Saying “as my friend” means you have high expectations from your listener. Use this phrase to point out how, because you are a person’s friend, your opinions are important to each other.
As my friend, you should have defended me.
You can also say "as your friend" to talk about yourself:
As your friend, I care about what happens to you.
Notice that “as (someone’s) friend” almost always is at the beginning of a sentence, because it’s an introduction for what comes next.