SQL – computing a new column using the Case statement