結果 : self join with case statement in sql