A: 

I'm not 100% sure what you're asking. Would COALESCE(rank1, rank2, rankX) where it would return the first non-null value work for you?

Jason
I don't think so, i'm trying to get for all rows, and from what I understand, COALESCE will only give me the first non-null value. I'm trying to get the nearest non-null value. I'm editing the question with example data.
pedalpete