FLAC or ALAC. Both lossless. One is controlled by the Evil Empire, your choice...
As long as you have up-to-date codecs and your processor isn't so low-powered as to struggle with decoding flac or alac, then all 3 will sound identical as all are lossless. Also the 'as long as" scenarios described in this post are not common. Just go with flac or alac, whichever your system supports, or flip a coin for either if both work without any tweaking.
I use AIFF. Haven't spend much time comparing the different formats because I find this sort of A/B testing tedious. AIFF seems to be a nice compromise between tagging ability and lack of compression. General consensus seems to be that WAV has the potential for best fidelity while FLAC/ALAC may not sound as good. Storage is so bloody cheap why bother with compression at all? I mean, this is a site dedicated to maximum fidelity, correct? What's a few hundred bucks extra for storage capacity in the context of a most of our systems?
If you are comparing a download (WAV) with a CD rip (FLAC) you may well be comparing much more than the difference in audio codecs. They might be entirely different masterings or mixes. Unless you could be certain they are from identical sources you could not be sure.
You could rip your CD to WAV and then to FLAC and that would ascertain a valid comparison.