SELECT   
    CASE WHEN TRY_CONVERT(FLOAT, 'test') IS NULL   
    THEN 'Cast failed'  
    ELSE 'Cast succeeded'  
END AS Result;  
GO
SELECT   
    CASE WHEN TRY_CONVERT(CHAR(10), 'test') IS NULL   
    THEN 'Cast failed'  
    ELSE 'Cast succeeded'  
END AS Result;  
GO
