We formulate a general shape and topology optimization problem in structural optimization by using a phase field approach. This problem is considered in view of well-posedness and we derive optimality conditions. We relate the diffuse interface problem to a perimeter penalized sharp interface shape optimization problem in the sense of $Gamma$-convergence of the reduced objective functional. Additionally, convergence of the equations of the first variation can be shown. The limit equations can also be derived directly from the problem in the sharp interface setting. Numerical computations demonstrate that the approach can be applied for complex structural optimization problems.