Looking for the name of old school anime. There was one giant mecha piloted by 3 different pilots. The mech changed forms depending on which pilot was in control. The different forms for the mech might have been elemental (earth water and fire).
This is very likely either Getter Robo which has three forms
Getter-1, commonly used for all situations, with an extra edge in aerial and even space combat due to anti-gravity cloak
Getter-2, its large drill allows it to travel underground, with weakness against underwater combat. Ironically it's actually the fastest and weaker of the three.
Getter-3, the strongest of the three, can withstand deep water pressure.
or other Getter Teams. Most of the teams has three pilots controlling smaller mech that can combine in different formations into one larger mech.
This could be "Albegas" ("Kōsoku Denjin Arubegasu", also known as Arbegas or Arebegas in the different dubs). It originally aired in Japan from 1983 to 1984; in the following years, dubbed versions were broadcast both in Europe and America.
If features three robots named after the first three letters of the Greek alphabet (Alpha, Beta and Gamma) that can combine to form a greater one (Albegas).
Initially, the robots are just the best 3 prototypes in an academic competition; when Earth is invaded by alien forces, a team of scientists ready them for battle, while the three students (two boys and a girl) that designed them continue being their pilots.
The peculiarity is that, rather that having each small robot always form the same part of the great one, they are completely interchangeable: any one of them can either form the upper, mid or lower part of Albegas, so there are six different possibile configurations (called Dimensions), each one with specific characteristics. The pilot of the small robot in the upper position is the one controlling that form of Albegas.
Some of the configurations are optimized for different environments (underground/volcano, air, water, outer space), which could fit the "elemental" theme you remember.
I have in my collection of Mecha anime that covers this answer. In America it is known as Aquarion, or Genesis of Aquarion (TV Tropes entry). It has two additional seasons, Aquarion Evol which is a direct sequel and Aquarion Logos which is a side universe.
Twelve thousand years in the past, mankind was at mercy of the mythical creatures known as Shadow Angels (堕天翅, Datenshi), immortal winged beings with overwhelming powers and technology. That is, until one of their kind, Apollonius, fell in love with a female human warrior, Seliane. Apollonius joins forces with the humans to free mankind from oppression, by using the legendary giant fighting robot Aquarion (アクエリオン, Akuerion).
Ordinary weapons prove ineffective against the Cherubim, and rings of projectors around the remaining cities, tapping into Earth's strata to project a quantum shield to keep Shadow Angels from entering or materializing in them, provide only limited protection. However a human expedition under the leadership of Gen Fudo excavates three very technologically advanced fighter planes, and an organization called DEAVA (ディーバ, Dība, Division of EArth Vitalization Advancement) takes over the research of these planes, called Vectors (ベクター, Bekutā), trying to identify how to use them. The three Vectors, colored mostly in white, are identified as the green Vector Luna (ベクタールナ, Bekutā Runa), the blue Vector Mars (ベクターマーズ, Bekutā Māzu), and the red Vector Sol (ベクターソル, Bekutā Soru). DEAVA discovers only people with special powers, called Elements (エレメント, Eremento), can use the Vectors and the three Vectors are in fact the pieces of Aquarion, the same robot used to fight the Shadow Angels twelve millennia before. They also discover the Elements can ultimately unite the Vectors into one of three formations of the giant robot in battle, and can use it to fight and defeat the Cherubim.
The mecha, Aquarion, is formed by the three pilots, designated as Elements, merging their Vectors together, and indeed, the robot is different depending on which Vector forms the body.
Could also be Vandread.
Three female pilots join their mechs with male pilot's mech, transforming into three different shapes depending on which mech joined with him the resulting fusion has different capabilities. Later, they learn how to combine all mechs into one.
The male-only planet Taraak and the female-only planet Mejeer have been at war with each other for years. During a military presentation of the Taraak space forces, their new combat ship built from that of the colonization, the Ikazuchi, is attacked and annexed by female pirates from Mejeer; not wanting to lose, the commander of the Taraakian forces prefers remotely destroy his ship with the intruders on board. There, a surprising event occurs. The Taraakian vessel and that of the pirates merge under the impulse of the Praksis crystal, a source of mysterious energy, to create a new vessel, which is later baptized NirVana. The Praksis energy ends up sending the newly formed vessel to depths of space.
This merge also affects Mejeerian combat shuttles, the Dreads, and a Taraakian mobile "armor", the Vanguard, transforming their appearance and giving the Dreads the ability to combine with the Vanguard, forming the Vandread units. Three men, a third-class worker and two officers who remained on board and were taken prisoner by the pirates, as well as the latter, will in spite of themselves have to collaborate and learn to coexist, because their salvation depends on their understanding in the face of a new common enemy, automated vessels from elsewhere and openly hostile to representatives of their species.
Maybe "Voltron" or "Voltran", even though it's a cartoon.
Could be "Magic Knight Rayearth" based on the element thing.