Yevamos3: 4
שְׁלֹשָׁה אַחִין, שְׁנַיִם מֵהֶן נְשׂוּאִין שְׁתֵּי אֲחָיוֹת, אוֹ אִשָּׁה וּבִתָּהּ אוֹ אִשָּׁה וּבַת בִּתָּהּ, אוֹ אִשָּׁה וּבַת בְּנָהּ — הֲרֵי אֵלּוּ חוֹלְצוֹת וְלֹא מִתְיַבְּמוֹת. וְרַבִּי שִׁמְעוֹן פּוֹטֵר. הָיְתָה אַחַת מֵהֶן אֲסוּרָה עָלָיו אִסּוּר עֶרְוָה — אָסוּר בָּהּ וּמֻתָּר בַּאֲחוֹתָהּ. אִסּוּר מִצְוָה אוֹ אִסּוּר קְדֻשָּׁה — חוֹלְצוֹת וְלֹא מִתְיַבְּמוֹת.
[If there were] three brothers, [and] two of them were married to two sisters, or [to] a woman and her daughter, or daughter's daughter, or son's daughter -— they require chalitzah but may not be taken in yibum. R' Shimon, however, releases [them]. [If] one of them was forbidden to him by the ervah prohibition, he is forbidden to her but permitted to her sister. [If it was] a prohibition by commandment or because of sanctity, she requires chalitzah but may not be taken in yibum.