Essentially I would like to determine a value based on a conditional and then use that value inside a different conditional all in the same select statement.