You can use the ENCRYPT function to encrypt data with the same method used by the WITH ENCRYPTION keyword. There's a rather large problem that I will discuss after the example. To use the ENCRYPT function, use it before the string value as shown below:
SELECT ENCRYPT('TestPW1')
CREATE TABLE Users (
UserID Varchar(10),
UserPW Varchar (20))
INSERT INTO USERS values('TestUser1',ENCRYPT('TestPW1'))
INSERT INTO USERS values('TestUser2',ENCRYPT('TestPW2'))
INSERT INTO USERS values('TestUser3',ENCRYPT('TestPW3'))
INSERT INTO USERS values('TestUser4',ENCRYPT('TestPW4'))
http://msdn.microsoft.com/en-us/library/cc278098(v=sql.100).aspx
http://www.sqlservercentral.com/articles/Security/encryptfunction/372/