Merging or transposing data
A better solution would be something like...

declare @t table (id int, Oper  varchar(50), DateTime DateTime)

insert into @t (id,Oper, DateTime) 
values( 3849, 'Login', '2019-12-17 06:30:57.500'),
(3849, 'Login',  '2019-12-17 06:30:57.500'),
(3849, 'Logout', '2019-12-17 15:46:37.880'),
(3849, 'Lunch',  '2019-12-17 12:16:11.373'),
(3849, 'LunEnd', '2019-12-17 12:46:26.807'),
(3862, 'Login',  '2019-12-17 06:30:57.500'),
(3862, 'Logout', '2019-12-17 15:46:37.880'),
(3862, 'Logout', '2019-12-17 15:46:38.280'),
(3862, 'Lunch',  '2019-12-17 12:16:11.373'),
(3862, 'LunEnd', '2019-12-17 12:46:26.807'),
(3862, 'Login',  '2019-12-18 06:30:57.500'),
(3862, 'Logout', '2019-12-18 15:46:37.880'),
(3862, 'Logout', '2019-12-18 15:46:38.280'),
(3862, 'Lunch',  '2019-12-18 12:16:11.373'),
(3862, 'LunEnd', '2019-12-18 12:46:26.807');


WITH X AS (
SELECT *
    , Cast([DateTime] AS DATE) AS [Date]
FROM @t 
)
SELECT id , [Date] , [Login] , [Lunch] , [LunEnd], [Logout]
FROM X
    PIVOT (
            MAX([DateTime])
            FOR Oper
            IN ([Login] , [Lunch] , [LunEnd], [Logout])
        )p  


Result:

+------+------------+-------------------------+-------------------------+-------------------------+-------------------------+
|  id  |    Date    |          Login          |          Lunch          |         LunEnd          |         Logout          |
+------+------------+-------------------------+-------------------------+-------------------------+-------------------------+
| 3849 | 2019-12-17 | 2019-12-17 06:30:57.500 | 2019-12-17 12:16:11.373 | 2019-12-17 12:46:26.807 | 2019-12-17 15:46:37.880 |
| 3862 | 2019-12-17 | 2019-12-17 06:30:57.500 | 2019-12-17 12:16:11.373 | 2019-12-17 12:46:26.807 | 2019-12-17 15:46:38.280 |
| 3862 | 2019-12-18 | 2019-12-18 06:30:57.500 | 2019-12-18 12:16:11.373 | 2019-12-18 12:46:26.807 | 2019-12-18 15:46:38.280 |
+------+------------+-------------------------+-------------------------+-------------------------+-------------------------+