Differentiation between zinc, aluminium, and magnesium ions in solution
Apart from the methods, Ringo already described, you can do a few other tests.

Aluminium

This is loosely translated from the German chemgapedia.de. Look at the pretty pictures.

Probably the easiest test you can do is reacting it with Morin in ethanoic acidic medium. It forms a yellow-green chelate complex, which has strong fluorescence under UV light. The colour and UV activity should be persistent when adding glacial acidic acid (water free), but vanish when adding concentrated hydrochloric acid. 



Unfortunately sodium is also fluorescent, so keep your equipment clean and if you use a base, use potassium hydroxide instead. Also perform blind tests with all the chemicals involved, to see if they are clean enough.

Other elements that can show fluorescence are $\ce{In^3+, Ga^3+, Sc^3+, Zr^4+, Be^2+}$, usually very pH dependent.

From my own experience in first year of university, this is a very efficient test. Another test, that can be performed from the salt, is reacting it to Cobalt blue. If you have a solution, you have to precipitate aluminium first: $$\ce{Al^3+ + 3 {}^{-}OH -&gt;C[NH3/NH4Cl] Al(OH)3 v}$$
Put the precipitate on a magnesia groove and add some cobalt nitrate. Glowing the mixture will result in the characteristic cobalt blue:
\begin{align}
\ce{2 Al(OH)3 &amp;-&gt;[\Delta] Al2O3 + 3 H2O ^}\\
\ce{Co(NO3)2 &amp;-&gt;[\Delta] CoO + 2NO2 ^ + 1/2 O2 ^}\\
\ce{CoO + Al2O3 &amp;-&gt;[\Delta] \color{\navy}{CoAl2O4}}\\
\end{align}

This is an almost fool proof method for aluminium and is not influenced by other elements. And it looks quite nice.

Zinc

Zinc is probably one of the only elements that form a white precipitate with sulfide ions. 
$$\ce{Zn^2+ + H2S -&gt; ZnS v + 2 H+}$$
This precipitate can be used to form Cobalt green. The procedure is the same as for the above Cobalt blue.
$$\ce{ZnS + Co(NO3)2 + O2 -&gt;[\Delta] \color{\green}{ZnCo2O4} + 4 NO2 ^ + SO2 ^ }$$

The only interference with this test is, that using too much cobalt nitrate will produce the black cobalt oxide, which can make it hard to see the green colour.
$$\ce{3Co(NO3)2 -&gt;[\Delta] \mathbf{Co3O4} + 6 NO2 ^ + O2 ^}$$

Again you can have a look at the pretty pictures at chemgapedia.de.

Magnesium

A common problem with magnesium is, that all tests only work well and specific if you have a pure solution. Most heavier elements react more readily with the chemicals, than magnesium itself does. Another problem is, that salts from magnesium have no flame colouration at all.

I am again loosely translating from chemgapedia.de.* 

You can precipitate magnesium with 8-hydroxyquinoline:


It forms a yellow-green complex. This is only a specific test, if you know you have no heavier elements in your test tube. For example, aluminium forms the complex Tris(8-hydroxyquinolinato)aluminium: $$\ce{Al^3+ + 3 C9H6NOH -&gt; Al(C9H6NO)3 + 3 H+}$$

Another possibility is precipitation as magnesium ammonium phosphate (struvite). And yes, you guessed it, this happens with all other alkali and earth alkali elements (except lithium). But if you are certain you only have got magnesium, you can grow nice crystals. The pH for this reaction should be buffered at around 8-9 with ammonia/ ammonium chloride. 
$$\ce{Mg^2+ + NH4+ + {}^{-}OH + HPO4^2- -&gt;C[H2O][NH3/NH4Cl] Mg(NH4)PO4⋅6H2O v}$$

There are two more tests, that I would consider best suitable, because of the pretty colour.

The reaction of magnesium hydroxide with titan yellow in presence of sodium hydroxide will produce a red precipitate. It is important to do a control/ blind experiment, as older solutions of titan yellow will form a precipitate with sodium hydroxide alone. 

The reaction of magnesium hydroxide with azo violet (Magneson) or Magneson II (Magnezon II) in presence of sodium hydroxide will produce a blue precipitate. Again test with sodium hydroxide to observe the violet solution. This reaction also occurs with $\ce{Ca^2+, Al^3+}$.

Testing for magnesium is as far as I remember is some kind of a lottery when in combination with other elements (qualitative analysis). Good luck.



* Please note that the first reaction equation has depicted hydroxyquinoline with two circles for the aromatic system, which is wrong. In benzene one circle stands for 6 $\pi$ electrons. So that would lead to hydroxyquinoline having 12 $\pi$ electrons, two too many.