Yes. Let's say the data is already encoded, due to some recent application changes to how it is inserted into the database.
Now, the value passed into the stored procedure is always encoded. But, we don't want to encode the encoded data again because it wouldn't match the encoded passed in parameter. Thus, we decode the assumed encoded data in the database (if it is already decoded (about 97% of our data is unencoded) decoding has no effect) giving it a true plain text foundation, then re-encode it so that it matches the encoded parameter passed in.
Is that clear enough?