Sql Case When In Join Statement In Python Coder Platform