Can I store data in encrypted form in database?
Yes if You know how to write/deploy the appropriate encryption algorithm
and Your organization has in place the proper procedures for <key> management
Is there a simple logic for this?
depends on Your proficiency in encryption techniques
the best thing to do is To speak to Your audit and legal department for the implications