Query inside Li (list)

I have a db table “table” as follows:

CatID ParentID Name Choice
1 0 first 1
2 0 second 2
3 0 third 2
4 1 fourth 1
5 4 fifth 2
6 1 sixth 2

and I have List as follows:

echo ‘<li>’ . $value[‘name’] . ;
echo’<a href="gofast.php?new=forecast&newCatId=’ . $value[‘CatID’] .<img src=“images/green.gif” ‘</a>’;
<a href="goslow.php?new=warning&CatId=’ . $value[‘CatID’] .<img src=“images/red.gif” ‘</a>’;
echo ‘</li>’;

I need to display “green.gif” only when the row has choice=1.
In other words when the choice = 1, both “green.gif and red.gif” are displayed.
Similarly, when choice=0 only “red.gif” should be displayed.
I can get the mysql $query/$result but unable to achieve my requirement as stated above. Any suggestions please?

Thank you in advance.