The biggest determining factor in choosing your case is just what you want to use your PC for. Function definitely determines form, and if you have a clear idea of your goals, then you can choose a case that will complement them.
A standard desktop system doesn't need a huge chassis, whereas a hardcore gaming system may well need extra space beyond the usual ATX standards. A home theatre PC will ultimately sit in an entertainment system, so factors like size and looks become very important, as does the level of noise that the case emits. A home server needs decent cooling, but the right case will be determined by factors like the number of hard drives that you can mount within.
The sheer diversity of cases on the market means that there will be multiple choices for all but the most obscure of needs. Even if you can't find the one you want in retail stores, there are plenty of online options for getting your hands on the right case. But if you are ordering online you need to be doubly sure that the chassis you want is going to work with your hardware.
Motherboard form factor
Of all the bits and pieces that go inside a case, the one that ultimately determines your options is the motherboard. As discussed in previous issues, motherboards conform to the ATX specifications. This lets you easily compare the specs for motherboards and cases to decide if they will work together.
You will also want to keep in mind what expansion cards you want to plug into the motherboard. Most Mini-ITX systems won't be able to accommodate a full-sized graphics card.
However you might be able to fit a half-height card if your motherboard has a x16 PCI-Express graphics slot. At the other end of the spectrum sit cards like the ATI RADEON HD 5970, which is the longest graphics card on the market and overhangs the motherboard by a fair amount. In a lot of cases there just isn't room to accommodate this length, with drive bays getting in the way of mounting. Most manufacturers will note support for large graphics cards on their websites - if not, a Google search should give you an idea of other people's experience with different card/case combos.
Heatsink
If you are building a system for hardcore gaming or overclocking and need to use a third party heatsink then case selection can get a touch tricky. Some heatsinks are gigantic and are too tall to fit into standard cases. You can find the dimensions of heatsinks on manufacturer websites, but keep in mind that you will need to factor in the thickness of the motherboard and CPU.
Another really handy feature for such heatsinks can be found in some cases. This is a small window or hatch in the motherboard tray that lets you access the rear of the heatsink mount. Without this, some heatsinks will require you to remove your motherboard to change them, which is a thorough pain in the rear end when it happens.
Storage needs
The other major determining factor is how many hard drives are planned for your system. Even the most basic ATX case will accommodate enough drives for desktop needs, but if you are building a system that will store media or backups then you will want future expandability. If you are running RAID or another data redundancy system, the number of drives in your system can quickly spiral, so plan to at least double the amount of drives in the lifetime of your system.
Most cases will come with adaptors to mount Solid State Drives in 3.5in drive bays. If you do end up running out of space for drives you can mount SSDs pretty much anywhere, as the lack of moving parts means they don't need to be secured like mechanical drives do.
Don't get too worried about 5.25in bays. The vast majority of users will only ever need a single optical drive, and cases with large numbers of 5.25in bays are mainly designed to accommodate boutique items like water cooling systems. For day-to-day use one or two 5.25in bays will be fine.
Power Supply
Most cases now ship without power supplies. This allows users to tailor their PSU to their needs, but is largely due to cases with power supplies needing to pass through more regulatory hoops than cases without. Thanks to the ATX spec you can confidently buy all but the most ridiculously powerful PSUs without worrying if they will fit.
One thing to keep in mind for convenience more than anything is that modular PSUs are far more friendly to case builders than ones with captive cords. Being able to reduce the number of cables makes for better airflow and a generally neater system. A lot of cases will come with room behind the motherboard tray to hide cabling, which is also made easier by the use of a modular power supply.
Special circumstances
There are some extreme circumstances where you need to be particularly choosy with your case. As a rule of thumb any hardcore gaming motherboard that supports Quad SLI or 4-way Crossfire will not fit into a standard case. In order to fit the PCI-Express slots needed for four high-end graphics cards, manufacturers have to extend the motherboard beyond the ATX specification. Most of the time this means that you will be physically unable to mount the motherboard, but sometimes you can fit the board but not access all the PCI-E slots.
These motherboards can be identified by the use of form factors like HTPX and EATX. If you want to useone of these boards then you'll need to spend some time online researching the case choices, which may take a little while to source. First point of call should be the motherboard manufacturers' website, where you can often find a tech support entry or forum post outlining which chassis are compatible with the motherboards.