you can create sql statement which
Dim id As String = "Model1"
Dim plan999 As Integer = 1200
Dim plan1200 As Integer = 0
Dim sql As String = "select id, CASE when @Plan999 = 0 then [Plan 1200] else [Plan 999] END CASE from TableName where id =@id and (@Plan999 = 0 Or [Plan 999] = @Plan999) and (@Plan1200 = 0 Or [Plan 1200] = @Plan1200)"
Hope this will help you to get started