Thanks @kuema for your detailed explanation. I have tried exactly like you suggested and have shared my below findings of the three debug nodes from the flow that I have.
Please see to it, the data from the database is still not getting extracted. You might get a clear view from the screenshots.
Just one last question : Has it got anything with Primary key in the database to do? Is it necessary that the column name in the query must be a primary key in the database?
No, not for functionality. But for performance reasons I would use proper indexes on columns that are part of conditions in your queries.
In most database systems the primary key is indexed by default, so adding one on uID would be a good idea. (I don't know enough about your table structure for a precise answer)
Just to clear up why this did not replace ${msg.payload} with the value from the payload. It is because, as I said in my last post and as detailed in the link I posted you need to use backticks not double quotes to use this form of string interpollation.
@Colin Thanks again for your reply. I understand exactly now what you mean, I am sorry that I somehow could not try exactly like you suggested as being a beginner I got a bit confused. I am sure it is gonna work too. Thanks for your efforts, means a lot