If You are using SQL Server 2008
select VersionNo from Versions order by cast("https://stackoverflow.com/" + replace(VersionNo , '.', "https://stackoverflow.com/") + "https://stackoverflow.com/" as hierarchyid);
Edit:
Solutions for 2000, 2005, 2008: Solutions to T-SQL Sorting Challenge here.