We obtain, under suitable conditions, the Green's function to express the unique solution for a second-order functional differential equation with periodic boundary conditions and functional dependence given by a piecewise constant function. This expression is given in terms of the solutions for certain associated problems. The sign of the solution is determined taking into account the sign of that Green's function.