Thank you for the detailed description!
If you would like to stick to the built-in data table solution you could use extraction steps
to get the value from screen you have verified with the data source. This could be also implemented in an if..else statement
if necessary. The extraction to variables could be also completed in a coded step
in case you decide to go for a complete coded solution. This is the valid approach if you are about to use the local data source as there is no way to access the grid itself.
On the other hand if using an external data source, like Excel for example, you could read the values from it to compare them with the entry returned by the call towards the database. Here is a sample article
which demonstrates how to write to an Excel file but I guess will be helpful for you to understand how to interact with an external file. How to use the TestData class
can be found here
I hope the shared information will be useful to you. Though in case of questions please let me know!