How to find which version and edition of SQL Server Database Engine is running?

Although there are many approaches to find this, as per me best approach is to run below code (SQL Script) on the SQL instance:

SELECT SERVERPROPERTY('productversion'), SERVERPROPERTY ('productlevel'), SERVERPROPERTY ('edition')

Note: This code is tested on SQL 2008/R2, 2005 and 2000.