Please help me with below query , I want to check if string is starts with 'G' or 'F' in where condition along with existing condition. here is the query
first query :-
SELECT Top 1 LC_ID,ISNULL(LC_UD,0) as Record from CONTRACT where LC_ID ='F01'
F01 | 1 ( if available) else no record will be return.
IF LC_ID starts with 'F%' or 'G%'
How i can integrate both the query into one so that if there is no record available for 'F01' value, it will check if LC_ID starts with F & G then return
F04 | 1
else no record will be return.