Depends on the situation...
Let's assume the friend is a really
good friend, and they should be or I probably wouldn't be hanging out with them.
In the case of a sister, I'd only bang her if either:
A. I was serious about dating her, which seems very improbable with my present mindset.
B. She possessed the slut mentality.
C. My buddy didn't really care one way or another.
As for a friend's wife, there's no circumstance that is acceptable.
Girlfriend's are a different animal. It's very unlikely I'd do something like this, unless it had to be done. Essentially to either break-up the relationship, generally by proving to my friend how much of a slut his girlfriend really is. There was a band that had something like this happen, and wrote a couple songs about it, reminded me of something I had to do years ago. My friend very seriously said, "Fuck her if you really think you can." Ah, a challenge! So, I really had no choice in that one.