I've just been researching the same problem as I'm investigating mySQL after having used both column and db level encryption in SQL Server.
So this has answered my concerns that mySQL did not have out of the box db level encryption but it may be worth mentioning in the answer given above it would result in a table scan every time it is called. This is because each row will have to be read so the data can be decrypted before being compared. That invalidates any index that may have been put on the column (if there's any value in that too!) However the following statement would do the same thing but only calls ENCRYPT once and possibly gets around any table scans. Note: mySQL syntax is probably incorrect in places.
DECLARE $EncryptedValue ...
SELECT $EncryptedValue = AES_ENCRYPT(`$input`, 'key')
SELECT
*,
$input as `decrypted`
FROM enc
WHERE
`field`=$EncryptedValue