Working with any component

Hi guys,
I need your kind advise Please…
I am firing a sql query to fusion table which is giving me results like -
L1,L2, R1,R5 and so on.

I have a vertical arrangement, in which i have few buttons say L1 L2…L10 and R1,R2…R10.

I want to change buttons’s background color for those button’s whose name is returned by fusion table query.

Basically, its a bus ticket booking aPPlication where all the reserved seats are to be marked as red.

Any helP is much aPPreciated…