If a character who has the sanctuary spell cast on them moves out of melee and provokes an opportunity attack, but then the attacker fails their wisdom save from sanctuary to make the attack, can the opportunity attacker redirect their reaction to another creature within reach?
On a failed save, the creature must choose a new target or lose the attack or spell. (PHB 272)
While it is not explicitly stated, it is a reasonable assumption you have to choose a valid target for your attack (or spell). Like, the spell description does not say, but obviously you must choose a target within range. A valid target for an opportunity attack is someone who has moved out of your reach. So, barring special circumstances NO.
From a fluff standpoint: you provide an opportunity attack by giving an opening when you move away. This does not make anyone else nearby targetable by a quick strike.
(The only special circumstance I can think of is if two targets use their reaction on the same trigger (readied movement or are hit with a Twinned Dissonant Whispers) and both move out of reach at the same time. Depending on your GM's stance on simultaneity this might vary, but lets not get into that here.)