Valve with sliding sleeve