A foe leaves the reach of my 5-foot reach sword. Can I make an Opportunity Attack with my 10-foot reach whip?

This is a follow up to the question: When are Opportunity Attacks provoked while holding a reach and a non-reach weapon?

The answers establish pretty solidly that if I hold a weapon with a reach of 5 feet (say, a sword) and another weapon with a reach of 10 feet (say, a whip), an adjacent foe still triggers an Opportunity Attack if they move 5 feet away from me.

However, it is not clear to me if I can use either weapon for my Opportunity Attack, or if I have to use the weapon the enemy moved out of the reach of.

Can I use either weapon for the Opportunity Attack or does it have to be the weapon that the enemy leaves the reach of?