Query SQL Server Version

select
SERVERPROPERTY('ProductVersion') as ProductVersion,
SERVERPROPERTY('ProductLevel') as ProductLevel,
SERVERPROPERTY('Edition') as Edition