I suggest avoiding this kind of expression. It can easily bring performance issues as it's prone to bad parameter sniffing.
Use dynamic SQL instead:
DECLARE @sql nvarchar(max)
SET @sql = '
SELECT *
FROM User
WHERE ' + CASE @User_id WHEN 0 THEN ' 1 = 1 ' ELSE ' User_id = @User_id ' END
EXEC sp_executesql @sql, N'@User_id int', @User_id
Hope this helps
Gianluca