SELECT FinNumber FROM (

  SELECT
    CS.FinNumber,
    CAST(JSON_VALUE(IF(COALESCE(SO.OptionValue, '') = '', '{"Internal":0}', SO.OptionValue), '$.Internal') AS INT) AS Internal
  FROM
    taClients AS CS
      LEFT JOIN taSystemOption AS SO ON ((SO.OptionType = 'TERMINATION') AND (SO.OptionDescription = CS.TerminationReason))

) AS X
WHERE
  (Internal > 0)
