Whenever you use a SYMMETRIC KEY to encrypt and when you created it you used a password, you have to OPEN the SYMMETRIC key in order to use it, and you have to specify the password because there is no way for SQL to open it when it is password based.
The sequence would be:
CREATE MASTER KEY ENCRYPTION BY PASSWORD = 'P@SS'
OPEN MASTER KEY DECRYPTION BY PASSWORD = 'P@SS'
CREATE CERTIFICATE CertEncrypt
WITH SUBJECT = 'CertSubject',
EXPIRY_DATE = '1/1/2009'
CREATE SYMMETRIC KEY Key2Encrypt WITH ALGORITHM=AES_256
ENCRYPTION BY CERTIFICATE CertEncrypt
CLOSE MASTER KEY
OPEN SYMMETRIC KEY DECRYPTION BY CERTIFICATE CertEncrypt
INSERT INTO TEST VALUES(EncryptByKey(key_guid('Key2Encrypt'), 'JAHANZAIB')
CLOSE SYMMETRIC KEY Key2Encrypt
SELECT CONVERT(VARCHAR,DecryptByKeyAutoCert(cert_ID('CertEncrypt'), NULL, B)) FROM TEST