The headlight switch is a common item to fail or catch fire on the A6 c5. Here's a guide on how to change it by pelican parts.
Part number: 4B1941531C
Also certain A6 c5 won't have the light adjustment such as the RS6 due to the RS6 having self leveling suspension and xenon headlights. Furthermore the older (pre facelift version, don't have the soft touch finish which generally lasts longer. The last picture shows the difference. Left facelift with soft touch plastic. Right prefacelift cars without soft touch plastic.
in addition the height adjuster can fail often due to the plastic link bar breaking. Think it connects to the ARB. If it's in tact, then it's worth checking the levelling motors. They're about 20 quid new.
1. Turn the headlight switch to the off position and push the knob inward (green arrow). Turn the knob clockwise. As you turn it, the switch housing will eject itself from the dashboard.
2. Pull the switch out of the dashboard as shown here. You need to be able to access the electrical connection on the back side.
3. Press the tabs on the rear of the electrical connector (green arrows) and pull the connector off. The new switch is installed in the reverse order of removal.
https://www.pelicanparts.com/techarticles/Audi_A6_C5/16-ELEC-Headlight_Switch_Replacement/16-ELEC-Headlight_Switch_Replacement.htm