The following t-sql statement returns the server name, server instance, instance, edition & version of the running SQL-Server.
SELECT SERVERPROPERTY('MachineName') AS [ServerName], SERVERPROPERTY('ServerName') AS [ServerInstanceName], SERVERPROPERTY('InstanceName') AS [Instance], SERVERPROPERTY('Edition') AS [Edition], SERVERPROPERTY('ProductVersion') AS [ProductVersion], Left(@@Version, Charindex('-', @@version) - 2) As VersionName