I want to know difference of calculation cost between SHA(hash) and AES(reversible encryption) I want do detect illegal modification of a string by using HMAC-SHA256 or AES/CBC/PKCS5Padding, with low calculation cost.
Which is the best answer?

I plan to save data in a DB with one of the following format

| METHOD                   | original STRING | VALIDATION BY  |  
|--------------------------|-----------------|----------------|  
| H:= HMAC-SHA256          | org-string      | H(org-string)  |  
| A:= AES/CBC/PKCS5Padding | org-string      | A(org-string)  |  


IF A(org-string) cannot be decrypted, the original STRING is modified.

FYI:
 This question well explained difference between SHA and AES.
With AES/CBC mode, an attacker can modify the string, and have the result decrypt without errors; the only thing that can cause a decryption failure is an illegal padding pattern after decryption, and:


If the plaintext string is at least 17 bytes long, then the attacker can modify the string without affecting the padding bytes (and thus leave a valid padding pattern)
Alternatively, changing the entire ciphertext randomly leaves a 1/256 chance that, after decryption, the last byte of the ciphertext is 01 (which is a valid padding pattern)


Hence, to answer your question, HMAC-SHA256 is the best answer, as AES doesn't do the job at all.  If your crypto toolkit provides it, you might want to consider AES-CMAC instead (which is another right answer for this problem)