結果 : sql create variable based on condition