The first thing you need to do is work out what the day bit of the date is ... for that you can use
DATEPART[
^]
For example:
SELECT *, datepart(D, DateOfPurchase) AS [day] from [table]
which gives you
ProductId DateOfPurchase Quantity day
1245 2018-03-10 50 10
4577 2018-03-23 100 23
You can then use that [day] in a test using
CASE[
^] with
BETWEEN[
^]
For example (incomplete)
Select
Week1 = case when datepart(D, DateOfPurchase) BETWEEN 1 AND 7 THEN Quantity
ELSE NULL END,
Week2 = case when datepart(D, DateOfPurchase) BETWEEN 8 AND 15 THEN Quantity
ELSE NULL END, ...