One of the columns in my table is "DataSource". Datasource can have two values, lets say "A" or "B". I would like to always take the row when Datasource = "A", however, if there isn't an entry for A I would like to take "B".
How does one do this in SQL Server?
EDIT:
So for a partucular product (Product ID) one Product ID may have two rows, each containing a different DataSource, wheres another ProductID may only have one DataSource:
{ProductID DataSource}
{1 A},
{1 B},
{2 B}
Here I would wish to select the top and bottom row