Depending on what you would like to do with it there are probably easier solutions. And not even a need for a workaround. I'd assume your current solution isn't optimal from a performance, size and usability perspective.
But depending on the settings of the line items you could use functions like NAME() to make some comparisons.Or bluntly compare the line item TEST 2 with the ITEM()-function/property you are using to name it.
In case this isn't detailed enough, please provide the following information: