相关度排序问题
如何利用SQL语法来实现数据库搜索的相关度排序 
 例如: 
                字段1            字段2         字段3            字段4.... 
 1            2005年         高层         封闭小区      精装修 
 2            2005年         高层         半封闭式      精装修   
 当用户搜索条件为:字段1   like   2005年,字段2   like   高层,字段3   like   半封闭,字段4   like   毛坯   的时候,第二条数据能够因为匹配的字段更多   而排在前面。换句话说就是能够在数据库中找到与给定记录更加匹配的记录,并按照匹配的程度进行排序。各位有没有什么办法或写法啊。!
------解决方案----------------------后面加上order,如: 
 Order by (Case when Charindex( '2005年 ',字段1)> 0 then 1 else 0 end)+ 
          (Case when Charindex( '高层 ',字段2)> 0   then 1 else 0 end)+ 
          (Case when Charindex( '半封闭 ',字段3)> 0 then 1 else 0 end)+ 
          (Case when Charindex( '毛坯 ',字段4)> 0   then 1 else 0 end) Desc