Hello,
if the column ID is empty you can use:
<%# IfEmpty(Eval("ID"),"","<a href=\"http://"+ Eval("BookingURL")+"/widget/index/?source=x&id="+ Eval("ID")+"\" target=\"_blank\" class=\"SubscriptionButton\">"+ ResHelper.GetString("Title")+"</a>") %>
otherwise if you need to compare ID with other value you can use:
<%#IfCompare(Eval("ID"),0,"<a href=\"http://"+ Eval("BookingURL")+"/widget/index/?source=x&id="+ Eval("ID")+"\" target=\"_blank\" class=\"SubscriptionButton\">"+ ResHelper.GetString("Title")+"</a>","") %>
More detail you can find below:
https://docs.kentico.com/display/K81/Reference+-+Transformation+methods