Put the object into a Family, so you can reference the Targeter & Targetee.
Use Pick by comparison (Targeter), where Team=1, Foreach, Pick by comparison (Targetee), where Team=2, Pick random instance. Have Targeter target Targetee.
Do the opposite for Team=2, targetting Team 1.