I am having a use case where I have to create a new column based on 3 columns X, Y and Z. If a value of X is in between the range of columns Y and Z then the new column has the value X else the complete row is deleted. I am using a postgre in - database sql engine for computation. Can you please help me in writing a formula which best suits this use case ? ( I couldn't use in between in the formula as it is showing me an error, may be my usage is wrong in this case).