I'm just asking how to make a certain kind of conditional SQL statement. All the information needed to provide context is provided.