Deductions & credits

I think that there is some calculation that if you could not take the deduction for the state tax payment, than any refund is not considered income. Is that right?  Can you show an example?