Spells which keep them/allies out of range, if the enemy is dangerous in melee
Mobility via teleportation (Misty Step, Dimension Door, Teleport) or increased speed (Haste, Fly, Investiture of Wind) can keep them out of reach of the enemy, if it's strong in melee.
Spells which protect them/allies from ranged attacks, if the enemy is dangerous at range
Some spells can make them or their allies harder to hit with ranged weapon attacks (Warding Wind, Investiture of Wind, Haste).
Others can provide total cover against ranged attacks (Wall of Stone, Wall of Force).
Spells which heal themself/allies fighting the enemy
Healing spells or spells which remove/prevent debilitating conditions will keep their martial allies in the fight. (e.g. Heal, Greater Restoration, Dispel Evil and Good)
Spells which provide powerful nonmagical attacks at range
Shapechange or True Polymorph can allow the spellcaster to transform themself into a creature with strong non-magical ranged attacks, such as a Giant (rocks) or a Dragon (breath).
Situationally, Control Water could allow you to try to drown the enemy by causing water to flow outside the area of the spell.
Necromancy spells (watch out for uncontrolled zombies)
Undead that the spellcaster has raised with spells such as Animate Dead or Create Undead will not become inanimate in the Antimagic Field - but the spellcaster's control over them will lapse. Given that the undead will at that point be right next to the enemy, that's probably not all that bad.
Trap them in a Prismatic Wall
Prismatic Wall is explicitly immune to Antimagic Field, and can be shaped to contain such an enemy. Since they've got an Antimagic Field up, they must drop it before they can cast any teleportation spells to escape this trap.
Wish the Antimagic away
The only spell which is capable of directly dispelling the Antimagic Field is Wish. Speaking as a DM, "Beat this specialised level 8 spell" is probably not the level of power at which I would start to bring in unintended consequences of the Wish. This does risk a 33% chance to never be able to cast Wish again, so it is a steep cost.