This Microsoft support article, How to identify your SQL Server version and Edition, shows how for all versions from SQL Server 2008 back to 6.5
For SQL Server 2008:
SELECT SERVERPROPERTY(‘productversion’), SERVERPROPERTY(‘productlevel’), SERVERPROPERTY (‘edition’)