The story begins with a group of high school students entering a different dimension/world. The main male character awakens a female robot/witch by using her wand/staff which is key shaped at the end to turn on the spring on her back. When the female robot/witch first saw him, she said something like "Are you my new master? You seem like a great guy. I'm glad."
The female robot/witch lost her memory and was used by an evil person and listened to the evil person and used her power trying to destroy the world. But the female robot/witch is a good person deep down inside her heart. The other females characters from the magical dimension have power to manipulate elements like wind, water, and fire with a ring or bracelet.
I watched this anime in the 90s, does anyone know what it is?