The Polearm Master feat reads:
While you are wielding a glaive, halberd, pike, or quarterstaff, other creatures provoke an opportunity attack from you when they enter your reach.
Let's say my character is wielding a quarterstaff in one hand and a whip in the other hand, and I have the Polearm Master feat. When a character enters a square within 10 feet of me (which is within my reach with the whip), can I use the whip to make an opportunity attack?
The relevant reach for the opportunity attack on an approaching enemy is the reach of your polearm, because the rules have changed.
It's very understandable that this question got brought up. The original wording of the Polearm Master feat certainly did imply that "your reach" might apply to any weapon, not just your polearm. But more recent reprints of the Player's Handbook (3rd reprint or newer) include new wording of the Polearm Master feat. I've reproduced the 3rd reprint version below (PHB, p. 168, bold and italics added for emphasis: bracketed addition reflects newer reprints than the 3rd reprint one I own).
This change was strangely not mentioned in any errata to date (which do mention the addition of the spear in the list of polearms for this feat), but the newest version of the text has made its way into some official online resources, such as DnD Beyond's PHB compendium content (though it strangely has not been updated on some other DnD Beyond pages, such as the link posted above in this question).
This last italicized phrase makes the situation unambiguous: the word "that" must refer to one of the weapons previously mentioned. So the relevant reach is the reach of the polearm you are wielding, not the reach of some other weapon. Thus, in your example, if you were wielding a quarterstaff and a whip (assume you had the Dual Wielding feat to remove the question of whether you could be said to be "wielding" both weapons if you could only attack with one in a turn), the enemy would provoke an opportunity attack when they moved within 5 feet of you (the quarterstaff's reach), not within 10 feat (the whip's reach). To summarize, for the purpose of the second bullet of the Polearm Master feat, only your polearm's reach matters (not the reach of some additional wielded weapon).