Hi,
For this you must use a weldments. When use this, first you create a patch structure for this it will be a box and then you use structure profile. This profile isn't default in SolidWorks so you must create this first and click on the box. Use tutorials in SolidWorks Help->Tutorial.