Your title can be interpreted in a variety of ways.
Do you want to add an id attribute to an element like the code exmaple above?
Do you want to get all sub field values from row 1?
Do you wan to get all sub field values from row x, where sub field y = ‘abc’?
Just an example for now to show the conditional. But what I am actually trying to do is associate a row with an author_id (some user data). So if a post is by a certain author, it will display an associated row of data about that particular author.