Yevamos, Chapter 4, Mishnah 8. This mishnah presents two cases that are identical in structure but differ in their halachah: the sister of the woman to whom he performed chalitzah, and the sister of the woman he divorced.
The first case - the sister of his chalutzah:
"Chalatz liyvimto v'nasa achiv es achosah u'meis" - a man performed chalitzah with his yevamah; afterward his brother married the sister of that chalutzah, and then died. It turns out that the sister of his chalutzah now falls before him for yibum.
The sister of a chalutzah is forbidden to him, but her prohibition is only rabbinic. Therefore the halachah is "choletz v'lo m'yabem" - he performs chalitzah but does not perform yibum: he cannot perform yibum because of her relationship to him, she is the sister of his chalutzah and forbidden to him by rabbinic law; but chalitzah is required, since by Torah law the obligation of yibum still applies to her.
The second case - the sister of the woman he divorced:
The mishnah continues: "V'chen ha'migaresh es ishto v'nasa achiv es achosah u'meis" - the plain meaning of the words is "and likewise one who divorced his wife," but as we will see immediately, this case actually contrasts with the previous one. The Gemara therefore explains the word "v'chen" as meaning "but."
The case itself: a man divorced his wife, his brother married the sister of that divorcee, and then died. It turns out that the widow falling before him is the sister of his divorcee, the sister of his former wife.
And here the halachah is: "Harei zo p'turah min ha'chalitzah u'min ha'yibum" - she is a full ervah, since she is the sister of his wife; and even though she is no longer his wife, since he was married to her in the past her sister remains forbidden to him. For this reason she is exempt from both, and even chalitzah is unnecessary, because she is a full ervah.
In summary: two cases with an identical structure but a different halachah. In the case of the sister of his chalutzah, whose prohibition is only rabbinic while by Torah law the obligation of yibum remains in place, he performs chalitzah but not yibum. In the case of the sister of his divorcee, who is a full ervah by Torah law, she is exempt from both chalitzah and yibum alike.