Q: Should someone attend the wedding of a close relative where there’s mixed dancing?
A: Now, we can rephrase this question. Should you attend a wedding of a close relative where they serve oysters? Mixed dancing is worse than oysters. Oysters, if somebody points a gun at your head and says, “Eat oysters,” So you can eat oysters to save your life. If he points a gun at your head and says, “Dance with that girl over there,” tell him to shoot. Or, take the gun away from him and shoot him! It’s “יהרג ואל יעבור”! Arayos! Immorality, a man should give his life rather than commit immoral things. The question is, what to do if you are invited and you don’t want to lose that relative. So here’s what you do: First of all, you have to try to be away. Even if you have to go to Eretz Yisroel at that time, it pays. What does it cost, $500? If you can afford it, do it. If not, go to Chicago, that’s a pretty good excuse. In case you can’t go anywhere, come into the lobby, come early and be conspicuous, so when your relative comes into the lobby, he should see you loafing there all the time, and then, when the dancing begins, quietly slip out and go home. If they say, “Why don’t you come in?” Say, “I was there!” “Why don’t you sit down and eat?” “I have stomach trouble, I have to go home.” (549)
From Rabbi Miller Book Q&A #2 Link