You need to determine the required amount of chain wrap. This is the number of teeth difference between the big/big and small/small chainring/cog combinations. For example, if you have a 52-42-30 up front, and an 11-25 rear cassette, then your required wrap is (52+25)-(30+11)=36. Your rear derailler must be able to take up 36 teeth. The derailleur should also be rated for the 25 tooth cog.
Now, you can cheat on this if you use discipline and avoid shifting into the big/big and/or small/small combinations. But it's probably best to get the derailleur that is failsafe.