There aren't any documented functions in SQL server.
But there are 2 undocumented password encryption function pwdencrypt/pwdcompare by which you can
encrypt and decrypt a string.
Following is the example.
declare @x varbinary(500)
declare @ret int
select pwdcompare('check',@x, 0)
You can use pwdencrypt in a update/insert trigger to
encrypt the values of a table's column. While decrypting
you'll have to use pwdcompare which will return 0 or 1 on
the basis of failed or successfull comparison respectively.
for more information visit
since these functions are undocumented i wont suggest you using them. you may go for third party
encryption, visit following url